package com.agile.leetcode.autocloeable;

import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeUnit;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/11/15 10:25
 */
public class Test {
    public static void main(String[] args) {
        try (Cost c = new Cost(System.currentTimeMillis())) {
            fun_1();
        } catch (Exception e) {

        }
    }

    public static void fun_1() throws InterruptedException {
        TimeUnit.SECONDS.sleep(ThreadLocalRandom.current().nextInt(4));
    }
}
